<?php
class FlagModel extends Db {
	protected $_flag = 'w_flag';
	
	/**
	 * 添加flag
	 *
	 * @param unknown_type $params        	
	 */
	public function addFlag($params) {
		$this->add ( $this->_flag, $params );
		/* 检查是否存在该范围内 */
		$sql = "ALTER TABLE `w_news_list` CHANGE `flag` `flag` SET('1','2','3','4','5','6','7','8','9','10') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
        ";
	}
	
	/**
	 * 自定义标签
	 * Enter description here .
	 */
	public function getFlag($where = NULL) {
		return $this->getAll ( $this->_flag, $where );
	}
	
	/**
	 * 返回FlagModel
	 * @return FlagModel
	 */
	public static function instance() {
		return self::_instance ( __CLASS__ );
	}
}